import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  { path: "/", redirect: "/login" },
  { name: "login", path: "/login", component: () => import("@/views/login") },
  {
    name: "article",
    path: "/article",
    component: () => import("@/views/article"),
    children: [
      {
        name: "dashboard",
        path: "dashboard",
        component: () => import("@/views/dashboard"),
      },
      {
        name: "layoutpage",
        path: "layoutpage",
        component: () => import("@/views/layoutpage"),
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
